import axios from '@/utils/request'

export const getArticle = params => axios.get('/v1_0/articles', { params })
export const getDetail = id => axios.get(`/v1_0/articles/${ id }`)
export const getFollowing = data => axios.post('/v1_0/user/followings', data)
export const delFollowing = id => axios.delete(`/v1_0/user/followings/${ id }`)
export const getCollect = id => axios.post('/v1_0/article/collections', {target: id})
export const delCollect = id => axios.delete(`/v1_0/article/collections/${id}`)
export const getLike = id => axios.post('/v1_0/article/likings', {target: id})
export const delLike = id => axios.delete(`/v1_0/article/likings/${id}`)
